//
//  UIView+Layer.m
//  JDXFoffice
//
//  Created by ZRAR on 16/4/1.
//  Copyright © 2016年 ZRAR. All rights reserved.
//

#import "UIView+Layer.h"

@implementation UIView (Layer)

@dynamic layerBorderWidth;
@dynamic layerBorderColor;
@dynamic layerCornerRadius;

- (void)setLayerBorderColor:(UIColor *)layerBorderColor{
    
    self.layer.borderColor = layerBorderColor.CGColor;
}

- (void)setLayerCornerRadius:(CGFloat)layerCornerRadius{
    
    self.layer.cornerRadius = layerCornerRadius;
    self.layer.masksToBounds = YES;
}

- (void)setLayerBorderWidth:(CGFloat)layerBorderWidth{
    
    self.layer.borderWidth = layerBorderWidth;
}

- (void)makeSelfCircle{
    self.layer.cornerRadius = self.bounds.size.width;
    self.layer.masksToBounds = YES;
}

- (void)setLayerWithBorderWidth:(CGFloat)borderWidth borderColor:(UIColor *)borderColor cornerRadius:(CGFloat)cornerRadius{
    
    self.layerCornerRadius = cornerRadius;
    self.layerBorderWidth = borderWidth;
    self.layerBorderColor = borderColor;
    
}

@end
